package com.netease.pris.c;

import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.os.Environment;
import com.netease.pris.a.f;
import com.netease.pris.atom.u;
import com.netease.pris.provider.i;
import java.io.File;
import java.util.LinkedList;
import java.util.List;

public class a
{
  static String[] a;
  static final int b = 0;
  static final int c = 1;
  static final int d = 2;
  static final int e = 3;
  static final int f = 4;
  static final int g = 5;
  static final int h = 6;
  static final int i = 7;
  static final int j = 8;
  static final int k = 9;
  static String l;

  static
  {
    String[] arrayOfString = new String[10];
    arrayOfString[0] = "_id";
    arrayOfString[1] = "uid";
    arrayOfString[2] = "updated";
    arrayOfString[3] = "image";
    arrayOfString[4] = "path";
    arrayOfString[5] = "type";
    arrayOfString[6] = "thumn_image";
    arrayOfString[7] = "thumb_path";
    arrayOfString[8] = "flag";
    arrayOfString[9] = "other";
    a = arrayOfString;
    l = Environment.getExternalStorageDirectory().toString() + "/" + "pris" + "/convertimage/";
  }

  public static String a()
  {
    if (!new File(l).exists())
      new File(l).mkdirs();
    return l;
  }

  public static final List a(Context paramContext)
  {
    Object localObject1 = null;
    if (paramContext == null);
    while (true)
    {
      return localObject1;
      Cursor localCursor = paramContext.getContentResolver().query(i.k, a, null, null, null);
      if (localCursor == null)
        continue;
      try
      {
        if (localCursor.moveToFirst())
        {
          LinkedList localLinkedList = new LinkedList();
          boolean bool;
          do
          {
            com.netease.pris.atom.b.a locala = new com.netease.pris.atom.b.a();
            locala.a(localCursor.getString(1));
            locala.d(localCursor.getString(5));
            locala.e(localCursor.getString(6));
            locala.f(localCursor.getString(7));
            locala.a(localCursor.getInt(8));
            locala.c(localCursor.getString(4));
            locala.b(localCursor.getString(3));
            localLinkedList.add(locala);
            bool = localCursor.moveToNext();
          }
          while (bool);
          localCursor.close();
          localObject1 = localLinkedList;
          continue;
        }
        localCursor.close();
        continue;
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
        localCursor.close();
        continue;
      }
      finally
      {
        localCursor.close();
      }
    }
    throw localObject2;
  }

  public static final void a(Context paramContext, String paramString, u paramu, com.netease.pris.atom.b.a parama)
  {
    if ((paramContext == null) || (paramu == null) || (parama == null) || (paramu.V() == null) || (paramu.V().length() == 0));
    while (true)
    {
      return;
      ContentValues localContentValues = new ContentValues();
      localContentValues.put("uid", paramu.V());
      localContentValues.put("updated", paramString);
      localContentValues.put("image", parama.b());
      localContentValues.put("path", parama.c());
      localContentValues.put("flag", Integer.valueOf(parama.g()));
      localContentValues.put("type", parama.d());
      localContentValues.put("thumn_image", parama.e());
      localContentValues.put("thumb_path", parama.f());
      localContentValues.put("other", paramu.toString());
      paramContext.getContentResolver().insert(i.k, localContentValues);
    }
  }

  public static final void a(Context paramContext, String paramString, LinkedList paramLinkedList1, LinkedList paramLinkedList2)
  {
    if ((paramContext == null) || (paramLinkedList1 == null) || (paramLinkedList2 == null) || (paramLinkedList1.size() != paramLinkedList2.size()));
    while (true)
    {
      return;
      for (int m = 0; m < paramLinkedList1.size(); m++)
      {
        u localu = (u)paramLinkedList1.get(m);
        com.netease.pris.atom.b.a locala = (com.netease.pris.atom.b.a)paramLinkedList2.get(m);
        if ((localu == null) || (locala == null))
          continue;
        a(paramContext, paramString, localu, locala);
      }
    }
  }

  public static final void a(List paramList)
  {
    f.a(new File(a()), paramList);
  }

  public static final void b(Context paramContext)
  {
    if (paramContext == null);
    while (true)
    {
      return;
      paramContext.getContentResolver().delete(i.k, null, null);
    }
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.pris.c.a
 * JD-Core Version:    0.6.0
 */